package com.foo.ui_demo_widge;

import androidx.appcompat.app.AppCompatActivity;

import android.media.Image;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

public class ImageActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_image);
        ImageView iv = findViewById(R.id.iv_scale);
        //居中拉伸
        iv.setScaleType(ImageView.ScaleType.CENTER);
    }
}